<%include file="include/head.html"%>
<div class="wrapper">
  <div id="div-home" class="main-info-box">
    <%include file="include/crumbs.html"%>
    <!-- <%include file="include/edit_nav.html"%>    -->
    <div class="div-info-body">

      <div id="family-links">
	<a href="/family/add">添加家谱</a>
      </div>
      <%if $families|@count gt 0%>
      <table id="family-list">
	<caption>家谱列表</caption>
	<tr>
          <th>序号
          </th>
          <th>族谱名称
          </th>
          <th>地区
          </th>
          <th>备注
          </th>
          <th>代表人物
          </th>
          <th>操作
          </th>
	</tr>
	<%foreach from=$families item=family name=family%>
	<tr>
	  <td class="num"><%$smarty.foreach.family.index+1%>
	  </td>
	  <td class="name"><a href="/family/view?fami_id=<%$family.id%>"><%$family.name%></a>
	  </td>
	  <td class="region"><%$family.region_name%>
	  </td>
	  <td class="notes"><%$family.notes%>
	  </td>
	  <td class="master">
            <a href="/users/home?userid=<%$family.master%>"><%$family.master_name%></a>
	  </td>
	  <td><a href="/family/edit?fami_id=<%$family.id%>">编辑</a>
	  </td>
	</tr>
	<%/foreach%>
      </table>
      <%$page%>
      <%/if%>
    </div>
    <div class="clear">
    </div>
  </div>
  </div>
  <%include file="include/bottom.html"%>
